package org.dylan.bdf.system.entity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.dylan.security.entity.IOperation;

@Entity
@Table(name = "SYS_OPERATION")
public class Operation extends Permission implements IOperation {
	private static final long serialVersionUID = -2366112603451744635L;
	public static final String PERMISSION_TYPE_OPERATION = "OPERATION";
	@ManyToOne
	@JoinColumn(name = "RESOURCE_ID")
	private Resource resource;

	public Resource getResource() {
		return resource;
	}

	public void setResource(Resource resource) {
		this.resource = resource;
	}

	@Override
	public String getPermissionType() {
		return PERMISSION_TYPE_OPERATION;
	}

}
